package com.xxlie.auth.common.exception.enums;

import com.xxlie.core.common.ExceptionEnums;

/**
 * rdp-project
 *
 * @author xxlie.com
 * @since 2017/9/22.
 */
public enum SecurityExceptionEnums implements ExceptionEnums {

    UNAUTHORIZED(40001, "请登录"),
    AUTHENTICATION(40002, "用户名或密码错误"),
    JWT_TOKEN_EXPIRED(40001, "令牌过期了"),
    UNAUTHORIZED_FAILED(40001, "授权失败"),
    ;

    public int code;
    public String message;

    private SecurityExceptionEnums(final int code, final String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
